<iframe th:replace="common/top.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>全部账户</title>
    <base th:href="@{/}">
    <link rel="StyleSheet" href="css/account.css" type="text/css" media="screen"/>
    <link rel="StyleSheet" href="css/common.css" type="text/css" media="screen"/>
    <link rel="StyleSheet" href="css/item.css" type="text/css" media="screen"/>
</head>
<body>
    <div class="button-container">
        <h1>全部账户</h1>
        <div style="text-align: center;float: right"><a th:href="@{/account/add}">添加用户</a></div>
    </div>
<!--    <h1>全部账户</h1>-->
<!--    <div style="text-align: center;float: right"><a th:href="@{/account/add}">添加用户</a></div>-->
    <table>
        <tr>
            <th>用户名</th>
            <th>电子邮箱</th>
            <th>姓</th>
            <th>名</th>
            <th>状态</th>
            <th>首选地址</th>
            <th>次要地址</th>
            <th>区</th>
            <th>市</th>
            <th>邮编</th>
            <th>国家</th>
            <th>电话</th>
            <th>操作</th>
        </tr>

        <tr th:each="Account : ${accountList}">
            <td th:text="${Account.userid}"></td>
            <td th:text="${Account.email}"></td>
            <td th:text="${Account.firstname}"></td>
            <td th:text="${Account.lastname}"></td>
            <td th:text="${Account['status']?:'NO'}"></td>
            <td th:text="${Account.address1}"></td>
            <td th:text="${Account.address2}"></td>
            <td th:text="${Account.city}"></td>
            <td th:text="${Account.state}"></td>
            <td th:text="${Account.zip}"></td>
            <td th:text="${Account.country}"></td>
            <td th:text="${Account.phone}"></td>
            <td>
                <a th:href="@{/account/profile/{userid}(userid=${Account.userid})}">详细信息</a>
                <a th:href="@{/account/delete/{userid}(userid=${Account.userid})}">删除用户</a>
                <a th:href="@{/account/reset/{userid}(userid=${Account.userid})}" id="resetPassword">重置密码 </a>
            </td>
        </tr>
    </table>

    <!-- 模态框 -->
    <div id="myModal" class="modal" th:if="${msg != null}">
        <!-- 模态框内容 -->
        <div class="modal-content">
            <span class="close"></span>
            <div th:if="${msg != null}" th:text="${msg}"></div>
            <button id="confirmBtn">确定</button>
        </div>
    </div>
    <div style="text-align: center"><a th:href="@{/account/add}">添加用户</a></div>
    <script src="js/account.js" type="text/javascript"></script>
    <iframe th:replace="common/bottom.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
<!--</body>-->
<!--</html>-->